package main

import "fmt"
import "os"

func WriteFile(path string) {
	f, err := os.Create(path)
	if err != nil {
		fmt.Println("打开文件异常")
		return
	}
	//1. 读取aaa.txt文件内容,并打印
	readPath := "../target/fuzhou news.ppt"
	content, err := os.ReadFile(readPath)
	if err != nil {
		fmt.Println("读取文件异常")
	}
	//fmt.Printf("%s\n", string(content))
	//2. 写入bbb.txt
	f.WriteString(string(content))
	defer f.Close()
}
func main() {
	path := "../target/fuzhou news result.ppt"
	WriteFile(path)
}
